package com.boot.security.server.model;


import com.boot.security.server.utils.AppConstants;
import com.jpay.util.StringUtils;

public class AppVisitPay extends BaseEntity<Long> {

	private String visitpayid;
	private String hostcode;
	private String itemno;
	private String patientid;
	private String visitno;
	private String itemname;
	private String itemclass;
	private String paycosts;
	private String visitdate;
	private String prescno;
	private String serialno;
	private String units;
	private String price;
	private String amount;
	private String itemspec;
	private String performedby;
	private String orderedby;
	private String dqbm;
	private String phone;

	private String cardno;
	private String cardtype;
	private String patientname;
	private String idcard;
	private String idcardtype;
	private String feelevel;
	private String usages;
	private String dose;
	private String doseage;
	private String days;
	private String fee;
	private String recipettype;
	private String tradeno;
	private String groupid;
	private String payable;
	private String unpayablereason;
	private String rtsettlement;
	private String paystaus;

	public String getVisitpayid() {
		return visitpayid;
	}
	public void setVisitpayid(String visitpayid) {
		this.visitpayid = visitpayid;
	}
	public String getHostcode() {
		return hostcode;
	}
	public void setHostcode(String hostcode) {
		this.hostcode = hostcode;
	}
	public String getItemno() {
		return itemno;
	}
	public void setItemno(String itemno) {
		this.itemno = itemno;
	}
	public String getPatientid() {
		return patientid;
	}
	public void setPatientid(String patientid) {
		this.patientid = patientid;
	}
	public String getVisitno() {
		return visitno;
	}
	public void setVisitno(String visitno) {
		this.visitno = visitno;
	}
	public String getItemname() {
		return itemname;
	}
	public void setItemname(String itemname) {
		this.itemname = itemname;
	}
	public String getItemclass() {
		return itemclass;
	}
	public void setItemclass(String itemclass) {
		this.itemclass = itemclass;
	}
	public String getPaycosts() {
		return paycosts;
	}
	public void setPaycosts(String paycosts) {
		this.paycosts = paycosts;
	}

	public String getVisitdate() {
		return visitdate;
	}

	public void setVisitdate(String visitdate) {
		this.visitdate = visitdate;
	}

	public String getPrescno() {
		return prescno;
	}
	public void setPrescno(String prescno) {
		this.prescno = prescno;
	}
	public String getSerialno() {
		return serialno;
	}
	public void setSerialno(String serialno) {
		this.serialno = serialno;
	}
	public String getUnits() {
		return units;
	}
	public void setUnits(String units) {
		this.units = units;
	}
	public String getPrice() {
		return price;
	}
	public void setPrice(String price) {
		this.price = price;
	}
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	public String getItemspec() {
		return itemspec;
	}
	public void setItemspec(String itemspec) {
		this.itemspec = itemspec;
	}
	public String getPerformedby() {
		return performedby;
	}
	public void setPerformedby(String performedby) {
		this.performedby = performedby;
	}
	public String getOrderedby() {
		return orderedby;
	}
	public void setOrderedby(String orderedby) {
		this.orderedby = orderedby;
	}
	public String getDqbm() {
		return dqbm;
	}
	public void setDqbm(String dqbm) {
		this.dqbm = dqbm;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getCardno() {
		return cardno;
	}

	public void setCardno(String cardno) {
		this.cardno = cardno;
	}

	public String getCardtype() {
		return cardtype;
	}

	public void setCardtype(String cardtype) {
		this.cardtype = cardtype;
	}

	public String getPatientname() {
		return patientname;
	}

	public void setPatientname(String patientname) {
		this.patientname = patientname;
	}

	public String getIdcard() {
		return idcard;
	}

	public void setIdcard(String idcard) {
		this.idcard = idcard;
	}

	public String getIdcardtype() {
		return idcardtype;
	}

	public void setIdcardtype(String idcardtype) {
		this.idcardtype = idcardtype;
	}

	public String getFeelevel() {
		return feelevel;
	}

	public void setFeelevel(String feelevel) {
		this.feelevel = feelevel;
	}

	public String getUsages() {
		return usages;
	}

	public void setUsages(String usages) {
		this.usages = usages;
	}

	public String getDose() {
		return dose;
	}

	public void setDose(String dose) {
		this.dose = dose;
	}

	public String getDoseage() {
		return doseage;
	}

	public void setDoseage(String doseage) {
		this.doseage = doseage;
	}

	public String getDays() {
		return days;
	}

	public void setDays(String days) {
		this.days = days;
	}

	public String getFee() {
		return fee;
	}

	public void setFee(String fee) {
		this.fee = fee;
	}

	public String getRecipettype() {
		return recipettype;
	}

	public void setRecipettype(String recipettype) {
		this.recipettype = recipettype;
	}

	public String getTradeno() {
		return tradeno;
	}

	public void setTradeno(String tradeno) {
		this.tradeno = tradeno;
	}

	public String getGroupid() {
		return groupid;
	}

	public void setGroupid(String groupid) {
		this.groupid = groupid;
	}

	public String getPayable() {
		return payable;
	}

	public void setPayable(String payable) {
		this.payable = payable;
	}

	public String getUnpayablereason() {
		return unpayablereason;
	}

	public void setUnpayablereason(String unpayablereason) {
		this.unpayablereason = unpayablereason;
	}

	public String getRtsettlement() {
		return rtsettlement;
	}

	public void setRtsettlement(String rtsettlement) {
		this.rtsettlement = rtsettlement;
	}

	public String getPaystaus() {
		return paystaus;
	}

	public void setPaystaus(String paystaus) {
		this.paystaus = paystaus;
	}

	public AppVisitPay() { }

	public AppVisitPay(AppPaymentOrder order,AppAccount account) {
		this.visitpayid = StringUtils.getUUID();
		this.hostcode = order.getHostcode(); //医院编码
		this.patientid = order.getPatientid()==null?null:order.getPatientid().toString();//就诊id
		//this.visitno = visitno;  //门诊号
		this.paycosts = order.getFee(); //缴费金额
		//this.visitdate = visitdate; //就诊日期
		this.prescno = order.getRecipeno()==null?null:order.getRecipeno().toString();
		this.serialno = order.getHisregno()==null?null:order.getHisregno().toString();
		this.performedby = order.getDeptcode1();
		this.orderedby = order.getDeptcode2();
		//this.dqbm = dqbm;  //地区编号
		this.phone = account.getPhoneNo();
		this.cardno = order.getCardno()==null?null:order.getCardno().toString();
		this.cardtype = order.getCardtype();
		this.patientname = order.getPatientname();
		this.idcard = order.getIdcard();
		this.idcardtype = order.getIdcardtype();
		this.recipettype = order.getRecipettype(); //处方类别
		this.tradeno = order.getTradeno();//订单号
		this.groupid = order.getGroupid()==null?null:order.getGroupid().toString();//处方组号
		this.payable = StringUtils.isNoneBlank(order.getUnpayreason())? AppConstants.YES :AppConstants.NO;//是否可支付
		this.unpayablereason = order.getUnpayreason();//不可支付原因
		this.paystaus = order.getPaystaus();//缴费状态
	}
}
